package com.sky.mapper;

import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 通过菜品id查询套餐id
     * @param ids
     * @return
     */
    public Long countSetmealByDishId(List<Long> ids);

    /**
     * 批量插入套餐商品明细
     * @param setmealDishes
     */
    void batchInsert(List<SetmealDish> setmealDishes);

    /**
     * 批量删除套餐明细
     * @param ids  套餐编号setmealId
     */
    void batchDelete(List<Long> ids);

    /**
     * 通过套餐id获取菜品
     * @param id
     * @return
     */
    List<SetmealDish> getBySetmealId(Long id);
}
